package v2;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: Administrator
 * Date: 2023-02-04
 * Time: 下午 22:55
 */
//控制反转的车
public class APP {

    public static void main(String[] args) {
        int size = 15;

        //当不在自己造车的零件以后,把控制权交了出来,就算需求发生改变,调用控制链也不再需要全部修改
        //我们的车只需要拿取相应的零件进行组装即可,产品的变更完全不需要管
        TireV2 tireV2 = new TireV2(15);
        BottomV2 bottomV2 = new BottomV2(tireV2);
        FrameworkV2 frameworkV2 = new FrameworkV2(bottomV2);
        CarV2 carV2 = new CarV2(frameworkV2);
        carV2.init();
    }
}
